home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1996-06-29 | 941 b | 36 lines |
- Reserve As Work 10,256*4
- CMAP=Start(10)
- Extension_8_0456 "dh1:test.pal",9
- AD=Start(9)
- CMAPTAB=0 : LOHI=0
- I=5
- For A=0 To Length(9)-1 Step 2
- CR=Deek(AD) : PA=Deek(AD+2) : Add AD,4
- If CR=$106
- CMAPTAB=(PA and $E000)/$2000
- LOHI=(PA and $200)/$200
- ' Print CMAPTAB,LOHI : Wait Key
- End If
- If(CR<>$106 and CR<$180) or CR=>$1C0
- ' Print Hex$(CR,4) : Wait Key
- End If
- If CR=>$180 and CR<=$1C0
- CO=(CR-$180)/2+CMAPTAB*32
- If CO>255 : Stop : End If
- ST=CMAP+CO*4
- R= Extension_8_03B2(PA)
- G= Extension_8_03C0(PA)
- B= Extension_8_03D0(PA)
- If LOHI=1
- Poke ST+1,(Peek(ST+1) and $F0)+R
- Poke ST+2,(Peek(ST+2) and $F0)+G
- Poke ST+3,(Peek(ST+3) and $F0)+B
- Else
- Poke ST+1,(Peek(ST+1) and $F)+R*$10
- Poke ST+2,(Peek(ST+2) and $F)+G*$10
- Poke ST+3,(Peek(ST+3) and $F)+B*$10
- End If
- End If
- If CO=255 Then Dec I : Exit If I=0
- Next
- Extension_8_0472 "ram:Test.cmap",10